import com.googlecode.lightest.studio.*

import grails.util.Environment

class BootStrap {

    def init = { servletContext ->
        if (Environment.getCurrent() == Environment.DEVELOPMENT) {
            def suite = new TestSuite()

            suite.name = 'My First Suite'
            suite.description = 'A very sweet suite'
            suite.temporary = false
            suite.save()

            def test = new Test()

            test.name = 'My First Test'
            test.className = 'a.test.class'
            test.description = 'A very testy test'
            test.inPlay = true
            test.save()

            suite.addToTests(test)
            //test.addToSuites(suite)

            def testDirectory = new TestDirectory()

            testDirectory.dir = 'C:\\work\\temp'

            testDirectory.save()
        }
    }

    def destroy = {
    }
} 